package com.xxx.study.designmodel.c抽象工厂模式;

/**
 * 组装计算器
 */
public class Computer {

    private CPUApi cpuApi = null;

    private MainBoardApi mainBoardApi = null;

    public Computer(CPUApi cpuApi, MainBoardApi mainBoardApi) {
        this.cpuApi = cpuApi;
        this.mainBoardApi = mainBoardApi;
    }

    /**
     * 装机后检测
     */
    public void check() {
        this.cpuApi.calc();
        this.mainBoardApi.installCPU();
    }
}
